package com.cdqidi.smsservice.repository;

import com.cdqidi.smsservice.domain.KernelReceiveLogs;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: sjkyll
 * Date: 2018-11-28
 * Time: 16:38
 */
public interface KernelReceiveLogsRepository extends JpaRepository<KernelReceiveLogs,String> {
//     @Query(value = "select r.dest_num as destNum,r.content as content,r.check_code as checkCode,r.receive_time as sendTime," +
//            "re.submit as sendSubmit,re.resp_id as respId,rep.send as reportState,rep.receive_time as reportTime,r.sms_number as smsNumber\n" +
//            "from kernel_receive_logs r left join kernel_submit_resp_logs re on r.auto_sn = re.auto_sn\n" +
//            "left join kernel_report_logs rep on r.auto_sn = rep.auto_sn\n" +
//            "where r.dest_num= :mobile\n" +
//            "order by r.receive_time desc",
//            countQuery = "select count(*) from kernel_receive_logs r left join kernel_submit_resp_logs re on r.auto_sn = re.auto_sn\n" +
//                    "left join kernel_report_logs rep on r.auto_sn = rep.auto_sn\n" +
//                    "where r.dest_num= :mobile\n" +
//                    "order by r.receive_time desc"
//            ,nativeQuery = true)
//     Page<Sms> findKernelReceiveLogs(@Param("mobile") String mobile, Pageable pageable);

}
